<!--{json width:"550",title:"评价主题"}-->
<style type="text/css">
.mod_rate_form dt {width: 20%;}
.mod_rate_form dd {width: 79%;}
</style>
<form action="?mod-rate-fid-$fid-pid-$pid-fid_tid-$fid_tids-ajax-1.htm" method="post" id="mod_rate_form_$pid" class="mod_rate_form">
	<input type="hidden" name="FORM_HASH" value="{FORM_HASH}" />
	<dl>
		<dt><label for="rate_credits">增加积分：</label></dt>
		<dd>
			<select name="credits" id="rate_credits_$pid">
				<option value="0" selected="selected"></option>
				<option value="1"> +1 </option>
				<option value="2"> +2 </option>
				<option value="4"> +4 </option>
				<option value="5"> +5 </option>
				<option value="6"> +6 </option>
				<option value="10"> +10 </option>
				<option value="20"> +20 </option>
				<option value="30"> +30 </option>
				<option value="50"> +50 </option>
				<option value="100"> +100 </option>
				<option value="-1"> -1 </option>
				<option value="-2"> -2 </option>
				<option value="-4"> -4 </option>
				<option value="-5"> -5 </option>
				<option value="-6"> -6 </option>
				<option value="-10"> -10 </option>
				<option value="-20"> -20 </option>
				<option value="-30"> -30 </option>
				<option value="-50"> -50 </option>
				<option value="-100"> -100 </option>
			</select>
			 今日剩余：<b>$remain_credits</b> 积分
		</dd>
		<!--{if $remain_golds}-->
		<dt><label for="rate_golds">增加金币：</label></dt>
		<dd>
			<select name="golds" id="rate_golds_$pid">
				<option value="0" selected="selected"></option>
				<option value="1"> +1 </option>
				<option value="2"> +2 </option>
				<option value="4"> +4 </option>
				<option value="5"> +5 </option>
				<option value="6"> +6 </option>
				<option value="10"> +10 </option>
				<option value="20"> +20 </option>
				<option value="30"> +30 </option>
				<option value="50"> +50 </option>
				<option value="100"> +100 </option>
				<option value="-1"> -1 </option>
				<option value="-2"> -2 </option>
				<option value="-4"> -4 </option>
				<option value="-5"> -5 </option>
				<option value="-6"> -6 </option>
				<option value="-10"> -10 </option>
				<option value="-20"> -20 </option>
				<option value="-30"> -30 </option>
				<option value="-50"> -50 </option>
				<option value="-100"> -100 </option>
			</select>
			  今日剩余：<b>$remain_golds</b> 金币
		</dd>
		<!--{/if}-->
		
		<dt><label for="rate_comment_$pid">版主点评：</label></dt>
		<dd>
			<textarea name="comment" id="rate_comment_$pid" style="width: 400px; height: 40px;" onkeyup="if(this.value.length > 64) {alert('最多只能输入64个字符。'); return false;}">$rate[comment]</textarea>
		</dd>
		
		<dt><label>通知作者：</label></dt>
		<dd><input type="checkbox" name="systempm" value="1" checked="checked" /></dd>
		
		<!--{if !empty($rate)}-->
		<dt>删除：</dt>
		<dd>
			<input type="checkbox" name="delete" value="1" />
		</dd>
		<!--{/if}-->
		
		<dt></dt>
		<dd>
			<input type="submit" class="button bigblue" id="mod_rate_submit_$pid" value="确定" />
			<input type="button" class="button biggrey" value="关闭" id="mod_rate_cancel_$pid"/>
		</dd>
	</dl>
</form>
<script type="text/javascript">

function delay_execute(dialog, recall) {
	$('#rate_credits_$pid').focus();
	$('#mod_rate_submit_$pid').click(function() {
		$('#mod_rate_submit_$pid').disable();
		var postdata = $("#mod_rate_form_$pid").serialize();
		$.post($('#mod_rate_form_$pid').attr('action'), postdata,  function(s){
			$('#mod_rate_submit_$pid').enable();
			var json = json_decode(s);
			if(error = json_error(json)) {alert(error); return false;}
			
			dialog.set_body('<div class="ok">'+json.message+'！</div>');
			setTimeout(function(){
 				dialog.close(true);
	 			if(recall) recall();
	 			window.location.reload();
	 		}, 1000);
		  });
		return false;
	});
	
	$('#mod_rate_cancel_$pid').click(function() {
		dialog.close(true);
	});
	
	$("#rate_credits_$pid option[value='{$rate[credits]}']").attr('selected', "selected");
	$("#rate_golds_$pid option[value='{$rate[golds]}']").attr('selected', "selected");
	
}
</script>